library(tidyverse)
[37m-- [1mAttaching packages[22m --------------------------------------- tidyverse 1.2.1 --[39m
[37m[32mv[37m [34mggplot2[37m 3.1.0 [32mv[37m [34mpurrr [37m 0.2.5
[32mv[37m [34mtibble [37m 2.0.1 [32mv[37m [34mdplyr [37m 0.7.8
[32mv[37m [34mtidyr [37m 0.8.2 [32mv[37m [34mstringr[37m 1.3.1
[32mv[37m [34mreadr [37m 1.3.1 [32mv[37m [34mforcats[37m 0.3.0[39m
[37m-- [1mConflicts[22m ------------------------------------------ tidyverse_conflicts() --
[31mx[37m [34mdplyr[37m::[32mfilter()[37m masks [34mstats[37m::filter()
[31mx[37m [34mdplyr[37m::[32mlag()[37m masks [34mstats[37m::lag()[39m
library(plotly)
Attaching package: 㤼㸱plotly㤼㸲
The following object is masked from 㤼㸱package:ggplot2㤼㸲:
last_plot
The following object is masked from 㤼㸱package:stats㤼㸲:
filter
The following object is masked from 㤼㸱package:graphics㤼㸲:
layout
library(crosstalk)
sd <- SharedData$new(txhousing, ~city)
p <- ggplot(sd, aes(date, median)) + geom_line()
gg <- ggplotly(p, tooltip = "city")
# Persistent mode can still be enabled in this case by holding the
# shift key when hovering over lines
bscols(highlight(gg, on = "plotly_hover", dynamic = TRUE),
# Persistent mode can be set permanently like so
highlight(gg, on = "plotly_hover", dynamic = TRUE, persistent = TRUE))
Adding more colors to the selection color palette.
Adding more colors to the selection color palette.
We recommend setting `persistent` to `FALSE` (the default) because persistent selection mode can now be used by holding the shift key (while triggering the `on` event).
Setting the `off` event (i.e., 'plotly_doubleclick') to match the `on` event (i.e., 'plotly_hover'). You can change this default via the `highlight()` function.
Setting the `off` event (i.e., 'plotly_doubleclick') to match the `on` event (i.e., 'plotly_hover'). You can change this default via the `highlight()` function.
Setting the `off` event (i.e., 'plotly_doubleclick') to match the `on` event (i.e., 'plotly_hover'). You can change this default via the `highlight()` function.
Setting the `off` event (i.e., 'plotly_doubleclick') to match the `on` event (i.e., 'plotly_hover'). You can change this default via the `highlight()` function.
LS0tDQp0aXRsZTogImxpbmtpbmcgJiBCcnVzaGluZyINCm91dHB1dDogaHRtbF9ub3RlYm9vaw0KLS0tDQoNCmBgYHtyfQ0KbGlicmFyeSh0aWR5dmVyc2UpDQpsaWJyYXJ5KHBsb3RseSkNCmxpYnJhcnkoY3Jvc3N0YWxrKQ0KYGBgDQoNCg0KYGBge3J9DQpzZCA8LSBTaGFyZWREYXRhJG5ldyh0eGhvdXNpbmcsIH5jaXR5KQ0KcCA8LSBnZ3Bsb3Qoc2QsIGFlcyhkYXRlLCBtZWRpYW4pKSArIGdlb21fbGluZSgpDQpnZyA8LSBnZ3Bsb3RseShwLCB0b29sdGlwID0gImNpdHkiKQ0KDQojIFBlcnNpc3RlbnQgbW9kZSBjYW4gc3RpbGwgYmUgZW5hYmxlZCBpbiB0aGlzIGNhc2UgYnkgaG9sZGluZyB0aGUNCiMgc2hpZnQga2V5IHdoZW4gaG92ZXJpbmcgb3ZlciBsaW5lcw0KDQpic2NvbHMoaGlnaGxpZ2h0KGdnLCBvbiA9ICJwbG90bHlfaG92ZXIiLCBkeW5hbWljID0gVFJVRSksDQoNCiMgUGVyc2lzdGVudCBtb2RlIGNhbiBiZSBzZXQgcGVybWFuZW50bHkgbGlrZSBzbw0KaGlnaGxpZ2h0KGdnLCBvbiA9ICJwbG90bHlfaG92ZXIiLCBkeW5hbWljID0gVFJVRSwgcGVyc2lzdGVudCA9IFRSVUUpKQ0KYGBgDQoNCg==